package com.aizuda.boot.modules.business.permission.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author sangyirong
 * @version 1.0
 * @date 2025/5/15
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("auth_role_permission")
public class RolePermissionEntity {


    @Schema(description = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 角色id
     */
    @Schema(description = "角色id")
    private Long roleId;

    /**
     * 权限编码
     */
    @Schema(description = "权限编码")
    private String permissionCode;


    @Schema(description = "权限范围")
    private String scope;

    /**
     * 存储权限的具体值，例如 'MY_CONTRACT' 或 'ALL_CONTRACT'
     */
    @Schema(description = "存储权限的具体值，例如 'MY_CONTRACT' 或 'ALL_CONTRACT'")
    private String permissionValue;

    @Schema(description = "是否删除")
    @TableLogic
    private Boolean isDeleted;
}